Add weekly background Kyoto CBF sync task (#352)#354
Add weekly background Kyoto CBF sync task (#352)#354Aniket-pd wants to merge 1 commit intobitcoindevkit:mainfrom
Conversation
|
Hi @Aniket-pd, I’m trying to review this PR but I’m running into a crash during kyoto sync. Have you ever seen this issue? `[Kyoto] Preparing CBF components – network: signet, dataDir: /Users/rubensmachion/Library/Developer/CoreSimulator/Devices/5D32E5C5-1662-4F90-966F-55371A6EAF07/data/Containers/Data/Application/648B220A-17C8-4CA5-9431-5539C1598899/Documents/wallet_data/kyoto, peers: 2, scanType: recovery(usedScriptIndex: 1000, checkpoint: BitcoinDevKit.RecoveryPoint.taprootActivation) thread '' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bdk_kyoto-0.15.3/src/lib.rs:160:43: Can't show file for stack frame : <DBGLLDBStackFrame: 0x93f04e800> - stackNumber:3 - name:panic_abort::__rust_start_panic::abort::h158a95d7d8b6f370. The file path does not exist on the file system: /rustc/4eb161250e340c8f48f66e2b929ef4a5bed7c181/library/panic_abort/src/lib.rs` |
|
just fyi, android saw a crash (I dont know where crash logs are so im not able to compare to know if this is same crash as that) on kyoto in bdk-ffi 2.3.0, so there will be an upcoming 2.3.1 patch release with kyoto patch bitcoindevkit/bdk-ffi#953 |
Description
This PR implements the background CBF sync flow discussed in #352.
In short, the app now registers a
BGProcessingTaskand schedules it to run roughly once a week (with network + external power requirements). When the task runs, it attempts to load the wallet and perform a Kyoto sync if the wallet exists and Kyoto is the selected backend.I also added the required
Info.plistentries for background processing and updated keychain accessibility to.afterFirstUnlockso background execution can still read wallet backup data while the device is locked.Notes to the reviewers
I kept this intentionally narrow to the core pieces needed for background sync:
I did not add product-level logging in this PR, since #351 tracks that separately.
Changelog notice
Add weekly background Kyoto CBF sync using
BGProcessingTask, including required background task configuration and keychain access changes needed for locked-device execution.Checklists
All Submissions:
.swift-formatfileNew Features:
Bugfixes: